package com.mzm.api;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CategoryDto implements Serializable {

	private static final long serialVersionUID = 1L;

	protected Integer id;

	private String name;

	private String path;

	private CategoryDto parent;

	private List<CategoryDto> children;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public CategoryDto getParent() {
		return parent;
	}

	public void setParent(CategoryDto parent) {
		this.parent = parent;
	}

	public List<CategoryDto> getChildren() {
		return children;
	}

	public void setChildren(List<CategoryDto> children) {
		this.children = children;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public void addChild(CategoryDto child) {
		if (this.children == null) {
			this.children = new ArrayList<CategoryDto>();
		}
		this.children.add(child);
	}
}
